/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.registration.core;

import com.registration.Persistent;

/**
 * @date May 7, 2012
 *
 * @author Ggutierrez
 */
public class Country implements Persistent {

    private Long id;
    private String name;
    private String nationality;
    private String phoneCode;
    private String initials;
    private boolean shown = true;

    public Country() {
    }

    public Country(String name, String nationality, String phoneCode) {
        this.name = name;
        this.nationality = nationality;
        this.phoneCode = phoneCode;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNationality() {
        return nationality;
    }

    public void setNationality(String nationality) {
        this.nationality = nationality;
    }

    public String getPhoneCode() {
        return phoneCode;
    }

    public void setPhoneCode(String phoneCode) {
        this.phoneCode = phoneCode;
    }

    public String getInitials() {
        return initials;
    }

    public void setInitials(String initials) {
        this.initials = initials;
    }        

    @Override
    public int hashCode() {
        return id.hashCode();
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if (!(other instanceof Country)) {
            return false;
        }
        Country _i = (Country) other;
        return id != null ? id.equals(_i.id) : false;
    }

    public boolean isShown() {
        return shown;
    }

    public void setShown(boolean shown) {
        this.shown = shown;
    }
}
